{{extend 'layout.html'}}

<div class="module">
	<div class="module-body">		
		{{=form}}
		{{if len(users)>0:}}
			<hr />
			<h3>{{=T("Gladiatori trovati")}}</h3>
			<table class="table table-striped">
				<tbody>				
					{{for user in users:}}
						<tr>					
							<td>
								<img class="nav-avatar" src="{{=URL('default', 'download', args=db.auth_user(user.id).thumbnail)}}">
								{{=A(name_of(user), _href=URL('wall', vars={"auth_user_id":user.id}))}}
							</td>
							<td>
								<button onclick="ajax('{{=URL('friendship', args=('request', user.id))}}', [], null);jQuery(this).parent().html('pending')">
									{{=T("Aggiungi agli amici")}}
								</button>
							</td>
						</tr>
					{{pass}}
				</tbody>
			</table>
		{{pass}}			
	</div>
</div>